Part 3 Test

mapreduce:mapreduce(
[{X,(2,3,self())},
{Y, (4,5,self())},
{Z, (6,7,self())}],
fun lists:append/2,
[]).

Pids = lists:map(
           fun(_) -> counterprocess:start() end,
           lists:seq(1, 4)).

Jobs = lists:map(
          fun(Pid) -> {Pid, {count, 1, 100000000, self()}} end,
          Pids).


mapreduce:mapreduce(
           Jobs,
           fun(Total, {ok, Result}) -> Total + Result end,
           0).
           
A = integers_list:start([9,8,7]).
B = integers_list:start([6,5,4]).
C = integers_list:start([3,2,1]).
Pids = [A, B, C].
FilterFun = fun(X) -> X > 4 end.

integer_finder:find_integers(Pids, FilterFun).
